//
//  NWHomeTableViewController.swift
//  微博01
//
//  Created by 牛威 on 15/12/5.
//  Copyright © 2015年 牛威. All rights reserved.
//

import UIKit

class NWHomeTableViewController: NWVisitorTableViewController {
    
    //MARK: - 设置nav的监听方法

    @objc  private  func searchFriends(){
    
        let vc = NWTempViewController()
        
        navigationController?.pushViewController(vc, animated: true)
      
        tabBarController?.tabBar.hidden = true
    
    }
    
      @objc  private  func pod(){
    
    print("pod")
    
    }
    
    

    override func viewDidLoad() {
        super.viewDidLoad()
        

        
        if login == true {
        
            //设置左右上角的button
            
            navigationItem.leftBarButtonItem = UIBarButtonItem(imageName: "navigationbar_friendsearch", target: self, action: "searchFriends")
            
            navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "navigationbar_pop", target: self, action: "pod")

        
        
        }else {
        
        
            visitorView?.setVisitorViewInfo(nil, message:"最美的不是下雨天,而是与你一起发过微博的下午")

        
        }

        
        

    }


}
